package lineareListen;

import java.io.BufferedReader;
import java.io.InputStreamReader;

class StackTest
{
    public static void main(String args[])
    {
        StackMitListe s = new StackMitListe();

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Bitte Zeichenkette eingeben: ");
        String str = "";
        try
        {
            str = in.readLine();
        }
        catch (Exception c)
        {
            System.out.println("kein Wert eingegeben");
        }

        int len = str.length();

        for (int i = 0; i < len; i++)
        {
            s.push(new Character(str.charAt(i)));
        }

        System.out.println();
        s.durchlaufe();

        while (!s.isEmpty())
        {
            Object o = s.pop();
            System.out.print(((Character) o).charValue());
        }

        System.out.println();
    }
}
